package com.ymttest.database.sqlwapper.godmch;

import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.agent_type;
import com.ymttest.database.model.mch_relation;
import com.ymttest.utils.EnvSetup;
/************************************************************************************
 * @File name : agent_typeWapperWapper.java
 * @Author : 吴文
 * @Date : 
 * @Copyright : 洋码头
 *godmach
 ************************************************************************************/
public class agent_typeWapper {
	SqlManager manage;
	public agent_typeWapper() {
		manage = new SqlManager("mysqlgodmchdb" + EnvSetup.getEnv());
		 
	}
	public  List<agent_type> selectby(Map<String,Object> map) throws InterruptedException {
		List<agent_type> list = manage.getSelectResults("com.ymttest.database.mapping.godmch.agent_typeMapper.selectby",map);
		manage.commit();
		return list;
	}
	
	public  agent_type selectByPrimaryKey(Integer agentType) throws InterruptedException {
		agent_type model=new agent_type();
		List<agent_type> lst = manage.getSelectResults("com.ymttest.database.mapping.godmch.agent_typeMapper.selectByPrimaryKey",agentType);
		if(lst.size()>0)
			 model=lst.get(0);
		manage.commit();
		return model;
	}
	
	
   public  int updateByPrimaryKey(agent_type record) throws InterruptedException {
		
		int result= manage.update("com.ymttest.database.mapping.godmch.agent_typeMapper.updateByPrimaryKey",record);
		manage.commit();
		return result;
	}

	public static void main(String args[]) {
	  
	}
}
